<?php
namespace Common\Model;
use Think\Model;
class ContractModel extends Model {
    /**
     * model的中文名称
     */
    public $modelName = '合同';

    /**
     * model的icon
     */
    public $modelIcon = 'icon-file';
    
    protected $_auto = [
        ["create_time", "time", 1, "function"],
        ["update_time", "time", 2, "function"],
    ];
    protected $_validate = [
        ["id", "require", "ID必须填写!"],
        ["type", "require", "合同类型必须填写!"],
        ["content", "require", "内容必须填写!"],
        ["create_time", "require", "创建时间必须填写!"],
        ["update_time", "require", "更新时间必须填写!"],
    ];
    public $excel = false;
    public $delete = false;
    public $fieldMap = [
        "id"=>[
            "type"=>"input",
            "name"=>"ID",
            "list"=>true,
            "search"=>true,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
        ],
        "type"=>[
            "type"=>"select",
            "name"=>"合同类型",
            "list"=>true,
            "search"=>true,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"定制导游,加入众筹,购买筹单,旅社加盟,导游加盟",
            "list_specify"=>"",
            "update_specify"=>"",
            "detail_specify"=>"",
        ],
        "content"=>[
            "type"=>"ueditor",
            "name"=>"内容",
            "list"=>false,
            "search"=>false,
            "input"=>true,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
        ],
        "create_time"=>[
            "type"=>"datetime",
            "name"=>"创建时间",
            "list"=>false,
            "search"=>false,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
        ],
        "update_time"=>[
            "type"=>"datetime",
            "name"=>"更新时间",
            "list"=>false,
            "search"=>false,
            "input"=>false,
            "required"=>true,
            "detail"=>true,
            "excel"=>true,
            "content"=>"",
            "list_specify"=>"",
        ],
    ];
}
